Increasingly, mobile wireless devices communicate messages over heterogeneous connections, in which one or more constituent links include a public network, such as the Internet. The Internet is a loosely-organized international collaboration of autonomous, interconnected, packet-based networks, including wireless networks, which can be represented by a hierarchical, multilayer architecture, service descriptions, and protocols. Communication endpoints, or hosts, can be interconnected over a network using intermediate packet-switching computers called routers. To communicate using the Internet, a host typically implements a protocol from at least one layer of a hierarchical Internet protocol suite. Each host and router executes one or more programs, or processes, which perform various tasks including information communication, processing, and display. An application can be a process that often operates at the topmost layer of the Internet protocol suite, and that may use a lower-layer transport protocol to provide transport layer communication services across distinct, but interconnected, networks. In turn, a transport protocol typically employs a network protocol to facilitate message transfer over a network between communicating processes. At the lowest layers, messages can be logically and physically transformed, and transported as electromagnetic or electro-optic signals through the networking media.
Numerous communication protocols exist, with some protocols being well suited for use with inter-networked communicating processes. For example, a full-duplex protocol can be advantageous because it permits essentially concurrent communication between connected hosts. Another protocol distinction may lie in whether a protocol is connection-oriented (end-to-end) or connectionless (stateless). In an end-to-end protocol, a connecting circuit, or bidirectional logical connection, typically is established prior to communication between the endpoint hosts. Also, connection-oriented protocols typically invest responsibility for communication integrity, security, and flow management in the communicating hosts, and not in intermediate computers or routers. Nevertheless, such protocols can be disrupted by delays or interruptions in one of the intermediate links or routers, which connect the hosts. To improve robustness of the communication system, routers often use connectionless network-layer protocols, which forward each message, or data unit, independently of others. In general, a stateless protocol offers no end-to-end message delivery guarantees. Independently transmitted messages may be forced to contend for the use of network resources as they are routed through the network. These messages may arrive at the destination host damaged, duplicated, out of order, or not at all. Thus, higher-layer processes, such as an application or a transport-layer process, typically would assume responsibility to correctly receive, reorder, repair, acknowledge receipt of, and request re-transmission of, the segments, or messages, conveyed by the connectionless protocol.
A connection-oriented protocol may be described as “reliable” if it includes a mechanism by which sender and receiver exchange information, directly or indirectly, about a communication state, such as a message delivery. Generally termed an “acknowledgement,” or ACK, the mechanism may involve a variety of techniques, such as a formatted response, to convey the information desired for a given protocol. In sender-initiated acknowledgement protocols, each communicating host, whether client or server, may retain a copy of transmitted messages for possible re-transmission until the corresponding receiving endpoint ACKs the particular message. When the recipient acknowledges receipt, the sender may release the memory locations in which the retained copies are stored. If a proper acknowledgement is not received, the sending endpoint may retransmit messages beginning at the point of the last proper ACK. In typical communications, multiple messages may be transmitted, with each host accumulating copies of sent messages until corresponding ACKs are received. There may be a risk that either, or both, host may temporarily become overwhelmed by the number of segments being stored, processed, received, and transmitted at a given time. This risk may be grounded in numerous sources, for example, the bursty nature of Internet communications, the ACK-related retention of previously transmitted messages, and the ability of hosts to transmit multiple messages.
A popular group of protocols used on the Internet is the Transmission Control Protocol/Internet Protocol (TCP/IP) protocol suite. The Transmission Control Protocol (TCP) is an end-to-end, full-duplex, transport protocol providing reliable inter-process communication between pairs of host computer processes. Using TCP, a message can be communicated using one or more formatted data units, called TCP segments. In addition to being a connection-oriented protocol, TCP further assures message delivery by employing message error detection and message receipt acknowledgements. Error detection can be in the form of a checksum, which usually corresponds to the data of, and can be incorporated into a respective TCP segment. Internet Protocol (IP) is a robust, connectionless network protocol, in which each message segment can incorporate identification information, including IP addresses for source and destination hosts. Using a destination host address, the IP protocol may route subsequent segments over multiple paths to increase the likelihood that a message, which includes one or more TCP segments, will reach the destination host intact, on time, and in order. TCP-like protocols may be used in conjunction with IP-like protocols to add a mechanism by which sender and receiver exchange information about the segments conveyed by the connectionless protocol, and by which reliable message exchange can be established. TCP message receipt acknowledgement generally uses positive acknowledgement-based, sender-initiated controls, which also may provide the communicating hosts with message sequencing information, host message or channel capacity, and so on. Implicitly, although TCP/IP can be a reliable, robust communication protocol suite, the actual flow of segments during communications may be bursty, that is, subject to wide variations in the volume of packets being transmitted at a given moment.
When an application program, or process, (e.g., HTTP) communicates with another host using TCP/IP-like protocols, the transport-layer processes (e.g., TCP) on either endpoint connect with the respective application using a logical device called socket. A TCP socket may include an IP address and a TCP port number. Typically, the IP address can be associated with the host, and the TCP port number can be associated with a particular communication function of the particular process invoking the host transport process. By directing messages through a specific local host socket to a specific remote socket, a local host may be capable of communicating across a network with the remote host. A communication buffer may be allocated at each endpoint of a TCP connection, as a TCP connection is established. Each communication buffer on each host may include one or more transmit buffers and receive buffers. An exemplary BUFFER READ can be an operation in which data is transferred from a buffer to an executing application (process). An exemplary BUFFER WRITE can be an operation in which data is transferred from a process to a buffer. During a communication, a remote host can function as a server to a client local host, and vice versa, with roles changing during the course of a communication. With full-duplex communications, hosts may communicate messages concurrently. However, a client or a server often cannot perform two transactions internally at once—for example, a BUFFER READ cannot be performed on a host buffer concurrently with a BUFFER WRITE, and vice versa. This aspect also may lend to a host being temporarily overwhelmed, for example, during a period of high message volume.
Relative to other communication systems, mobile devices often can be memory-constrained, with limited available communication memory space. Such constraints may adversely affect flow control and buffer management under some conditions. For example, memory-constrained devices may be susceptible to message flow anomalies such as buffer deadlock and buffer starvation. Buffer deadlock may arise when only one process at a time can use a buffer; when the process holding a buffer will release it only voluntarily, and after it has completed its task; when a first process holding a buffer is waiting to acquire additional buffers held by a second process; and when the second process is waiting to acquire additional buffers held by the first process. Buffer starvation may occur where an active, or high priority, first process consumes nearly all available buffers, thereby blocking a temporarily inactive, or low priority, second process, which waits for the buffers held by the first process to be released.
Certain mobile device processes may be configured to defer performing a BUFFER READ operation on a communication buffer until an in-progress BUFFER WRITE operation has completed. As such application processes execute, stored TCP segments can accumulate in both transmit and receive buffers of the mobile device, leading to exhaustion of the available communication memory space. With the memory space exhausted, the process may be unable to complete an in-progress BUFFER WRITE while, at the same time, it awaits the completion of the BUFFER WRITE to perform a BUFFER READ operation. Also, a mobile device process may execute a high message volume operation, which temporarily exhausts available communication memory space, and which leads other processes and operations to face buffer starvation. Typically, for some period after a buffer deadlock or a buffer starvation develops, the mobile device halts communication, while keeping open the TCP connection. Many TCP protocols and processes can provide timeout mechanisms, in which the TCP connection between the mobile device and the server can be closed after a predetermined timeout period.
This recovery technique can be inefficient because the timeout period may be on the order of several seconds. For a mobile user, buffer deadlock, buffer starvation, default TCP recovery mechanisms, and host overload during a period of high message volume, may lead to a reduced, and unsatisfactory, perceived Quality of Service. In the aggregate, these factors are of a type that can waste substantial mobile system resources. Thus, it is desirable to manage host resources, such that the impact of such factors may be reduced, or substantially eliminated.